import request from '@/utils/request'

// 查询MES 物料交易，记录物料入库、出库等交易全流程信息列表
export function listTransactions(query) {
  return request({
    url: '/material-service/inventory/transactions/list',
    method: 'get',
    params: query
  })
}

// 查询MES 物料交易，记录物料入库、出库等交易全流程信息详细
export function getTransactions(transactionId) {
  return request({
    url: '/material-service/inventory/transactions/' + transactionId,
    method: 'get'
  })
}

// 新增MES 物料交易，记录物料入库、出库等交易全流程信息
export function addTransactions(data) {
  return request({
    url: '/material-service/inventory/transactions',
    method: 'post',
    data: data
  })
}

// 修改MES 物料交易，记录物料入库、出库等交易全流程信息
export function updateTransactions(data) {
  return request({
    url: '/material-service/inventory/transactions',
    method: 'put',
    data: data
  })
}

// 删除MES 物料交易，记录物料入库、出库等交易全流程信息
export function delTransactions(transactionId) {
  return request({
    url: '/material-service/inventory/transactions/' + transactionId,
    method: 'delete'
  })
}
//展示饼状图数据
export function getShowList() {
  return request({
    url: '/material-service/inventory/transactionsToShow',
    method:'get'
  })
}